package com.dd.cloud.common.annotate.validation;
import com.dd.cloud.common.annotate.validation.impl.HeadImgValidation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 验证登录账户头像、身份证照片、法人代表复印件、执业资格证、执业注册证、其他相关资质、认证公函、营业执照照片
 */
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = HeadImgValidation.class)
public @interface HeadImg {

    /**
     * 提示的开头 即替换message {begin}的内容
     * @return
     */
    String begin() default "";

    boolean required() default true;

    String message() default "{begin}文件格式不符合要求";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
